﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DBProvider.Providers
{
	public interface IExaminationProvider
	{
		List<ExaminationCategory> GetAllExaminationCategory();
		ExaminationCategory CreateExaminationCategory(ExaminationCategory theNewExmtCat, out string msg);
		bool UpdateExaminationCategory(ExaminationCategory theExmtCat);
		bool DeleteExaminationCategory(int exmtCatID);
		Examination CreateExamination(Examination theExamination, out string msg);

		List<Examination> GetExaminationByCategory(int exmtCatID, int drugStoreID);
		List<Examination> GetExaminationByCategory(int exmtCatID, int drugStoreID, int pageIndex, int pageSize, out int totalRecords);
		Examination GetExamination(int exmtID);
		bool UpdateExamination(Examination theExmt);
		bool DeleteExamination(int exmtID);
		List<Examination> GetExaminationByUser(int userID);

		List<ExaminationQuestion> GetExaminationQuestionByExamination(int exmtID);
		ExaminationQuestion CreateExaminationQuestion(ExaminationQuestion theNewExmtQstn, bool saveAnswers, out string msg);
		bool UpdateExaminationQuestion(ExaminationQuestion theExmtQstn);
		bool DeleteExaminationQuestion(int exmtQstnID);

		List<ExaminationAnswer> GetExaminationAnswerByExamination(int exmtID);
		List<ExaminationAnswer> GetExaminationAnswerByUser(int userID);
		ExaminationAnswer CreateExaminationAnswer(ExaminationAnswer theNewExmtAswr, out string msg);
		bool UpdateExaminationAnswer(ExaminationAnswer theExmtAswr);
		bool DeleteExaminationAnswer(int exmtAswrID);

		void CreateRLTUserAndExamination(RLT_UserAndExamination theRLT_UserAndExmt);
		void CreateRLTUserAndExaminationAnswer(List<RLT_USERANDExaminationAnswer> lstRLT_USERANDExaminationAnswer);

		List<RLT_UserAndExamination> GetUserAndExaminationByUser(int userID);
		List<RLT_USERANDExaminationAnswer> GetUsersExaminationAnswer(int userID);

		List<RLT_ExaminationAndShareTo> GetExaminationAndShareToByExamination(int examinationID);
		void CreateExaminationAndShareTo(List<RLT_ExaminationAndShareTo> lstExaminationAndShareTo);
		void SaveExaminationAndShareTo(int examinationID, List<RLT_ExaminationAndShareTo> lstExaminationAndShareTo);

		bool DeleteExaminationQuestionByExamination(int exmtID);

		List<Examination> GetExaminationByCategory(int userID, int exmtCatID, int drugStoreID, int pageIndex, int pageSize, out int totalRecords);
	}
}
